Repository navigation
🐛 fix(cache): move locks to private directory - #214
Merged
gaborbernat merged 3 commits intoNov 3, 2026
Merged
Conversation
Another account can hold a readable cache lock without write access and block interpreter discovery. Put new POSIX locks in an owner-only directory and retain group access when the cache directory is group writable. New processes no longer wait on lock files opened by older releases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DiskContentStore.locked()placed cache locks in a traversable directory with permissions that let another local account hold an exclusive lock through a read-only descriptor. That account could stall interpreter discovery before a cached entry was read. The lock files now live in a directory accessible only to the cache owner or, for a group-writable cache, its group. This addresses draft advisory ANT-2026-VGW4GWQT.Readable cache locks could stall discovery
On Linux,
flock(2)permits an exclusive lock on a read-only descriptor. The previousFileLockcall used a lock file next to the cache entry. The newlocked()path useslocks-v2with owner-only access by default. It allows group writes when the cache directory is group-writable and the umask permits them. Existing lock files at the old path are ignored, including locks already held on them.Behavior changes
POSIX cache locks use the new directory. Group-writable caches retain group coordination under a group-permissive umask. Windows keeps its existing lock path. Processes running this and an older release against the same cache do not coordinate writes; use separate cache roots while both run, as the cache documentation describes.
Reported by Antigravity: ANT-2026-VGW4GWQT.